package com.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;

/**
 * @author java1412
 * @create 2022-09-01 15:12
 */
public class MySelfRule {
    @Bean
    public IRule myRule() {
        return new RandomRule();// 修改负载均衡策略是随机，默认是轮询
    }
}
